package com.bang.study.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: TestController
 * @Desc: TODO
 * @Auther: <Bang>
 * @Date: 2020/09/25 17:25
 * @Version: 1.0
 * @Modified By:
 */
@RestController
@RefreshScope
public class TestController {

    @Value("${username:123456}")
    private String username;

    @GetMapping(value = "/echo/{string}")
    public String echo(@PathVariable String string) {
        return "Hello Nacos Discovery " + string+username;
    }

}
